package com.yf1706.dao.jpa;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.yf1706.bean.EmpWorkHistory;

public interface IEmpWorkHistoryJDAO extends CrudRepository<EmpWorkHistory, Integer>{
	public List<EmpWorkHistory> findById(int id);
	//根据员工编号查找员工的工作履历对象集合
	@Query("select ewh from EmpWorkHistory ewh where ewh.emp.empId=:empId order by ewh.beginDate desc")
	public List<EmpWorkHistory> findByEmpId(@Param("empId")int empId);
}
